package com.zhanjixun.weixin.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.json.XML;

/**
 * 微信验证信息
 *
 * @author :zhanjixun
 * @date : 2018/10/21 12:32
 */
@Data
public class WxTicket {

    private Integer ret;
    private String message;
    private String skey;
    private String wxsid;
    private String wxuin;
    private String passTicket;
    private Integer isGrayScale;

    public static WxTicket valueOf(String text) {
        return JSON.parseObject(XML.toJSONObject(text).getJSONObject("error").toString(), WxTicket.class);
    }

}
